<?php
$this->breadcrumbs=array(
	UserModule::t('Users')=>array('admin'),
	UserModule::t('Manage'),
);
?>

<div id="tnm-body">
    	<div class="tnm-col-left">
        	<h2 class="title-tnm-col-left"><?php echo UserModule::t("Quản lý nhân viên"); ?></h2>
            <div class="sort">
                    
            <?php echo $this->renderPartial('_menu', array(
            		'list'=> array(
            			CHtml::link(UserModule::t('Thêm nhân viên'),array('create')),
            		),
            	));
            ?>
                
            </div>
            <div class="content-tnm-col-left">
            <?php $this->widget('zii.widgets.grid.CGridView', array(
            	'dataProvider'=>$dataProvider,
            	'columns'=>array(
            		array(
            			'name' => 'id',
            			'type'=>'raw',
            			'value' => 'CHtml::link(CHtml::encode($data->id),array("admin/update","id"=>$data->id))',
            		),
            		array(
            			'name' => 'username',
            			'type'=>'raw',
            			'value' => 'CHtml::link(CHtml::encode($data->username),array("admin/view","id"=>$data->id))',
            		),
            		array(
            			'name'=>'email',
            			'type'=>'raw',
            			'value'=>'CHtml::link(CHtml::encode($data->email), "mailto:".$data->email)',
            		),
            		array(
            			'name' => 'createtime',
            			'value' => 'date("d.m.Y H:i:s",$data->createtime)',
            		),
            		array(
            			'name' => 'lastvisit',
            			'value' => '(($data->lastvisit)?date("d.m.Y H:i:s",$data->lastvisit):UserModule::t("Not visited"))',
            		),
            		array(
            			'name'=>'status',
            			'value'=>'User::itemAlias("UserStatus",$data->status)',
            		),
            		array(
            			'name'=>'superuser',
            			'value'=>'User::itemAlias("AdminStatus",$data->superuser)',
            		),
            		array(
            			'class'=>'CButtonColumn',
            		),
            	),
            )); ?>

            </div>
            <div class="bottom-tnm-col-left"></div>
        </div>
        <div class="tnm-col-right">
            <h2 class="title-tnm-col-right">Menu quản lý</h2>
            <div class="content-tnm-col-right">
                <?php if(!Yii::app()->user->isGuest) $this->widget('UserMenu'); ?>
            </div>
            <div class="bottom-tnm-col-right"></div>
        </div>
    </div>


